package com.sailing.lianxi.thread;

/**
 * 线程创建方式-继承Thread
 * @author Administrator
 *
 */
public class MyThread  extends Thread{
	private int num =5;
	public void run(){
		for(int i=0;i<5;i++){
			System.out.println(Thread.currentThread().getName()+",value="+num--);
		}
	}
	public static void main(String[] args) {
		 for(int i=0;i<2;i++){
			 MyThread t1 = new MyThread();
			 t1.start();
		 }
	}
}
